<?php include_once 'header.php';?>
	<div class="row">
		<div class="col-md-12">
			<div class="card-deck">
				<div class="card shadow mb-2">
					<div class="card-body">
						<form>
							<div class="form-group">
								<label>页面数据条数</label>
								<input type="number" id="app_page_enums" class="form-control" value="<?echo $this->admConf['APP_PAGE_ENUMS'];?>">
							</div>
							<div class="form-group">
								<label>管理员日志</label>
								<select id="app_adm_log" class="form-control">
									<option value="on" <?echo $this->admConf['APP_ADM_LOG']=='on'?'selected':'';?>>开启</option>
									<option value="off" <?echo $this->admConf['APP_ADM_LOG']=='off'?'selected':'';?>>关闭</option>
								</select>
							</div>
							
							<div class="form-group">
								<label>用户日志</label>
								<select id="app_user_log" class="form-control">
									<option value="on" <?echo $this->admConf['APP_USER_LOG']=='on'?'selected':'';?>>开启</option>
									<option value="off" <?echo $this->admConf['APP_USER_LOG']=='off'?'selected':'';?>>关闭</option>
								</select>
							</div>
							
							<div class="form-group">
								<label>API运算成本</label>
								<select id="api_run_cost" class="form-control">
									<option value="on" <?echo $this->admConf['API_RUN_COST']=='on'?'selected':'';?>>开启</option>
									<option value="off" <?echo $this->admConf['API_RUN_COST']=='off'?'selected':'';?>>关闭</option>
								</select>
							</div>
							
							<div class="form-group">
								<label>数据输出格式</label>
								<select id="api_out_type" class="form-control">
									<option value="json" <?echo $this->admConf['API_OUT_TYPE']=='json'?'selected':'';?>>JSON</option>
									<option value="xml" <?echo $this->admConf['API_OUT_TYPE']=='xml'?'selected':'';?>>XML</option>
								</select>
							</div>
							
							<div class="form-group">
								<label>系统调试模式</label>
								<select id="sys_debug" class="form-control">
									<option value="y" <?if(U_DEBUG){echo 'selected';}?>>开启</option>
									<option value="n" <?if(!U_DEBUG){echo 'selected';}?>>关闭</option>
								</select>
							</div>
							
							<button type="submit" class="btn btn-primary btn-block" id="submit">提交</button>
						</form>
					</div>
				</div>
			</div>
			
		</div>
	</div>
	<script>
	    $("#submit").click(function(){var submit_data={};submit_data.app_page_enums=$("#app_page_enums").val();submit_data.app_adm_log=$("#app_adm_log").val();submit_data.app_user_log=$("#app_user_log").val();submit_data.api_run_cost=$("#api_run_cost").val();submit_data.api_out_type=$("#api_out_type").val();submit_data.sys_debug=$("#sys_debug").val();$("#submit").html('<i class="spinner-ui fe fe-rotate-cw fe-12 mr-2"></i>正在提交');$("#submit").attr("disabled",true);$.ajax({cache:false,type:"POST",data:submit_data,dataType:"json",success:function(data){$("#submit").html("提交");$("#submit").attr("disabled",false);if(data.code==200){cocoMessage.success("更新成功",2000)}else{cocoMessage.error(data.msg,2000)}}});return false});
	</script>	
<?php include_once 'footer.php';?>